package com.sbc.timer;

import java.util.Timer;
import java.util.TimerTask;

/**
 * @description: jdk 定时任务测试
 * @author: songbaicheng
 * @create: 2024/8/27 17:29
 **/
public class Test {
    public static void main(String[] args) {

        new Timer().schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("定时任务执行");
            }
        }, 1000, 2000);
    }
}
